cmake_minimum_required (VERSION 2.4.0 FATAL_ERROR)
project (BlackHoles)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")

set(EXECUTABLE_OUTPUT_PATH bin/${CMAKE_BUILD_TYPE})


find_package(
	OGRE 	
	REQUIRED
)

include(FindBoost)

set(Boost_USE_STATIC_LIBS   ON)
set(Boost_USE_MULTITHREADED ON)
find_package(Boost REQUIRED COMPONENTS system date_time filesystem thread iostreams regex serialization)

include_directories(${Boost_INCLUDE_DIRS})      


find_package(
	OIS 	
	REQUIRED
)

add_subdirectory (src)

SET(FILES ${SRC_FILES} ${HDR_FILES})

include_directories(${CMAKE_SOURCE_DIR}/src)
#Inclusion de OGRE
include_directories(${OGRE_INCLUDE_DIRS})

#Inclusion de OIS
include_directories(${OIS_INCLUDE_DIRS})

add_executable(
	black_holes
	${FILES}
)

target_link_libraries(
	black_holes 
	${Boost_LIBRARIES}
)

target_link_libraries(
	black_holes
	${OGRE_LIBRARIES}
)

target_link_libraries(
	black_holes
	${OIS_LIBRARIES}
)


ADD_CUSTOM_COMMAND(TARGET black_holes POST_BUILD
	COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/config ${CMAKE_CURRENT_BINARY_DIR}/config
	COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/media ${CMAKE_CURRENT_BINARY_DIR}/media	
)
